library(tidyverse)
library(DeclareDesign)
library(rdss)

sims <- 2000
bootstrap_sims <- 2000

source("code/declarations/declaration_18.10.R")
source("code/declarations/declaration_18.11.R")

design_stepped_wedge <- 
  declaration_18.10 |> 
  redesign(n_units = 100, effect_size = seq(from = 0, to = 0.75, by = 0.05))

design_single_period_100 <- 
  declaration_18.11 |> 
  redesign(n_units = 100, effect_size = seq(from = 0, to = 0.75, by = 0.05))
  
design_single_period_200 <-
  declaration_18.11 |> 
  redesign(n_units = 200, effect_size = seq(from = 0, to = 0.75, by = 0.05))

designs <- c(design_stepped_wedge, design_single_period_100, design_single_period_200)
attr(designs, "names") <- paste0("design_", 1:length(designs))

diagnosis_18.11 <- diagnose_design(designs, sims = sims, bootstrap_sims = bootstrap_sims)

write_rds(diagnosis_18.11, file = "diagnosis_objects/diagnosis_18.11.rds")
